package lucid.hrms.management.race;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RaceFinderImpl implements RaceFinder {

	@Autowired
	private RaceRepository raceRepository;

	@Override
	public List<Race> findRaces(RaceCriteria raceCriteria, int firstResult, int maxResults) {
		return raceRepository.findRaces(raceCriteria, firstResult, maxResults);
	}

	@Override
	public int getTotalRaces(RaceCriteria raceCriteria) {
		return raceRepository.getTotalRaces();
	}
}